import service from "../../utils/request"

//添加个人车源
export const addPersonalChannel = (data: PersonalChannel): Promise<Result<string>> => service.post('/personalchannel', data)

//查询分页个人车源
export const getPersonalChannelPage = (page: number, personalCarName: string): Promise<PageResult<ListPersonalChannel[]>> => service.get(`/personalchannel/page?page=${page}&personalCarName=${personalCarName}`)

//编辑个人车源
export const editPersonalChannel = (id: string, data: PersonalChannel): Promise<Result<string>> => service.patch(`/personalchannel/${id}`, data)

//删除个人车源
export const delPersonalChannel = (id: string): Promise<Result<string>> => service.delete(`/personalchannel/${id}`)

//批量删除个人车源
export const manyDelPersonalChannel = (idList: string[]): Promise<Result<string>> => service.post('/personalchannel/delMany', idList)